﻿using System;
using System.Collections.Generic;
using System.Runtime.Serialization;

namespace Libraries.Entities
{
    [DataContract]
    public class Account
    {
        [DataMember]
        public string EmployeeId { get; set; }

        [DataMember]
        public string AccountName { get; set; }

        [DataMember]
        public string FullName { get; set; }

        [DataMember]
        public int? LocationId { get; set; }

        [DataMember]
        public int? DepartmentId { get; set; }

        [DataMember]
        public int? JobTitleId { get; set; }

        [DataMember]
        public int? ContractTypeId { get; set; }

        [DataMember]
        public int? Month { get; set; }

        [DataMember]
        public int? LevelId { get; set; }

        [DataMember]
        public int? RankId { get; set; }

        [DataMember]
        public int? RoleId { get; set; }

        [DataMember]
        public int? OfficerCodeId { get; set; }

        [DataMember]
        public int? JobFunctionId { get; set; }

        [DataMember]
        public byte[] Image { get; set; }

        [DataMember]
        public string FileName { get; set; }

        [DataMember]
        public string FileType { get; set; }

        [DataMember]
        public DateTime? HireDate { get; set; }

        [DataMember]
        public DateTime? OutOfDate { get; set; }

        [DataMember]
        public DateTime? BOD { get; set; }

        [DataMember]
        public string MobilePhone { get; set; }

        [DataMember]
        public string Address { get; set; }

        [DataMember]
        public string Descriptions { get; set; }

        [DataMember]
        public int? StatusAccountId { get; set; }

        [DataMember]
        public bool? IsDeleted { get; set; }

        [DataMember]
        public int? CreateBy { get; set; }

        [DataMember]
        public DateTime? CreateDate { get; set; }

        [DataMember]
        public int? ModifiedBy { get; set; }

        [DataMember]
        public DateTime? ModifiedDate { get; set; }

        // Modify 2 properties further: 
        // To search on experience months
        [DataMember]
        public int MinMonth { get; set; }

        [DataMember]
        public int MaxMonth { get; set; }

        [DataMember]
        public virtual Rank Rank { get; set; }

        [DataMember]
        public virtual Level Level { get; set; }

        [DataMember]
        public virtual IList<AccountSkill> AccountSkills { get; set; }

        [DataMember]
        public virtual Department Department { get; set; }

        [DataMember]
        public virtual ContractType ContractType { get; set; }

        [DataMember]
        public virtual JobFunction JobFunction { get; set; }

        [DataMember]
        public virtual Location Location { get; set; }

        [DataMember]
        public virtual StatusAccount StatusAccount { get; set; }

        [DataMember]
        public virtual OfficerCode OfficerCode { get; set; }

        [DataMember]
        public virtual Role Role { get; set; }

        [DataMember]
        public virtual JobTitle JobTitle { get; set; }

        [DataMember]
        public virtual IList<AccountCertificate> AccountCertificates { get; set; }

        [DataMember]
        public virtual IList<CertificateRefund> CertificateRefunds { get; set; }

        [DataMember]
        public virtual IList<CourseRefund> CourseRefunds { get; set; }
        
        [DataMember]
        public virtual IList<LanguageScore> LanguageScores { get; set; }

        [DataMember]
        public int TotalRows { get; set; }
    }

    [DataContract]
    public class CertificateRefund
    {
        [DataMember]
        public int CertificateId { get; set; }

        [DataMember]
        public string Certificate { get; set; }

        [DataMember]
        public int TimeCommit { get; set; }

        [DataMember]
        public DateTime? CompleteDate { get; set; }

        [DataMember]
        public float Fee { get; set; }

        [DataMember]
        public float Refunds { get; set; }

        [DataMember]
        public string Currency { get; set; }

        [DataMember]
        public string Provider { get; set; }
    }

    [DataContract]
    public class CourseRefund
    {
        //[DataMember]
        //public int CourseId { get; set; }

        [DataMember]
        public string Course { get; set; }

        [DataMember]
        public int TimeCommit { get; set; }

        [DataMember]
        public DateTime? EndDate { get; set; }

        [DataMember]
        public float Costs { get; set; }

        [DataMember]
        public float Refunds { get; set; }

        [DataMember]
        public string Currency { get; set; }
    }
}